package com.prs.crm.domain.hr;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;

@Entity
@Table(name="hr_leave_type")
public class LeaveType extends BaseEntity{
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String name;
	@OneToMany(fetch=FetchType.LAZY,mappedBy="type")
	private Set<Leave> leaves;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setLeaves(Set<Leave> leaves) {
		this.leaves = leaves;
	}
	public Set<Leave> getLeaves() {
		return leaves;
	}
	
}
